{include file='../Public/public.html'}
<div class="admin">
  <div class="tab">
    <div class="tab-head"> <strong>文章管理</strong>
      <ul class="tab-nav">
        <li class="active"><a href="#tab-set">添加文章</a></li>
      </ul>
    </div>
    <div class="tab-body"> <br />
      <div class="tab-panel active" id="tab-set">
        <form method="POST" class="form-x" action="index.php?p=Admin&c=Article&a=dealEdit" enctype="multipart/form-data">
          <div class="form-group">
            <div class="label">
              <label for="sitename">文章标题</label>
            </div>
            <div class="field">
              <input type="text" value="{$artInfoById.title}" class="input" id="title" name="title" size="50" placeholder="文章标题" data-validate="required:请填写您的文章标题" />
            </div>
          </div>
          <div class="form-group">
            <div class="label">
              <label for="logo">缩略图</label>
            </div>
            <div class="field"> <a class="button input-file" href="javascript:void(0);">上传文件
              <input size="100" type="file" name="thumb" data-validate="regexp#.+.(jpg|jpeg|png|gif)$:只能上传jpg|gif|png格式文件" />
              <input type="hidden" name="thumb_bak" value="{$artInfoById.thumb}">  
            </a> </div>
          </div>
          <div class="form-group">
            <div class="label">
              <label for="siteurl">文章作者</label>
            </div>
            <div class="field">
              <input type="text" value="{$artInfoById.author}"  class="input" id="author" name="author" size="50" placeholder="请填写文章作者" data-validate="required:请填写文章作者" />
            </div>
          </div>
          <div class="form-group">
            <div class="label">
              <label for="sitename">所属类别</label>
            </div>
            <div class="field">
                <select class="select" name="cate_id">
                    {foreach from=$cateinfo item = 'row'}
                    <option value="{$row.cate_id}" {if $row.cate_id eq $artInfoById['cate_id']} selected {/if}>{$row.cate_name|indent:(5*$row.level):'-'}</option>
                    {/foreach}
              </select>
            </div>
          </div>
          <div class="form-group">
            <div class="label">
              <label for="readme">文章描述</label>
            </div>
            <div class="field">
              <textarea name="art_desc" class="input" rows="2" cols="50" placeholder="请填写文章描述" data-validate="required:请填写文章描述">
                {$artInfoById.art_desc}
              </textarea>
            </div>
          </div>
          <div class="form-group">
            <div class="label">
              <label for="readme">文章内容</label>
            </div>
            <div class="field">
              <textarea name="content" id="content" class="input" rows="8" cols="50" placeholder="请填写文章内容" data-validate="required:请填写文章内容">
                {$artInfoById.content}
              </textarea>
            </div>
    </div>
          <div class="form-button">
            <input type="hidden" name="art_id" value="{$artInfoById.art_id}">
            <button name="submit" class="button bg-main" type="submit">提交</button>
          </div>
        </form>
      </div>
    </div>
  </div>
  <div style='height:40px; border-bottom:1px #DDD solid'></div>
  <p class="text-right text-gray" style="float:right">基于<a class="text-gray" target="_blank" href="#">MVC框架</a>构建</p>
</div>
<script src="/App/Admin/Public/ckeditor/ckeditor.js"></script>
<script>

CKEDITOR.replace( 'content', {
	//设置ckfinder路径
	filebrowserBrowseUrl: '/App/Admin/Public/ckfinder/ckfinder.html',
	filebrowserUploadUrl: '/App/Admin/Public/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files'
} );
</script>

{include file='../Public/script.html'}
<script src="{$smarty.const.JS_DIR}/article.js"></script>
</body>
</html>